namespace TSL.BLL
{
    using System;
    using System.Collections.Generic;
    using System.Data;
    using TSL.DAL;
    using TSL.Model;

    public class Login
    {
        private readonly TSL.DAL.Login dal = new TSL.DAL.Login();

        public void AddLogin(TSL.Model.Login model)
        {
            this.dal.AddLogin(model);
        }

        public void Delete(string ID)
        {
            this.dal.Delete(ID);
        }

        public void DeleteLogin(string ID)
        {
            this.dal.DeleteLogin(ID);
        }

        public bool Exists(string name)
        {
            return this.dal.Exists(name);
        }

        public bool Exists(string ssc_id, string lottery_num)
        {
            return this.dal.Exists(ssc_id, lottery_num);
        }

        public List<TSL.Model.Login> GetListArray()
        {
            return this.dal.GetListArray("");
        }

        public List<TSL.Model.Login> GetListArray(string strWhere)
        {
            return this.dal.GetListArray(strWhere);
        }

        public List<TSL.Model.Login> GetListArrayBySupID(string supID)
        {
            string strWhere = " ID=" + supID;
            return this.dal.GetListArray(strWhere);
        }

        public DataSet GetListFromView(string strWhere)
        {
            return this.dal.GetListFromView(strWhere);
        }

        public TSL.Model.Login GetModel(string ID)
        {
            return this.dal.GetModel(ID);
        }

        public TSL.Model.Login GetModel(string name, string password)
        {
            return this.dal.GetModel(name, password);
        }

        public void Update(TSL.Model.Login model)
        {
            this.dal.Update(model);
        }
    }
}

